Integrative soft computing approaches for optimizing thermal energy performance in residential buildings

As is known, early prediction of thermal load in buildings can give valuable insight to engineers and energy experts in order to optimize the building design. Although different machine learning models have been promisingly employed for this problem, newer sophisticated techniques still require proper attention. This study aims at introducing novel hybrid algorithms for estimating building thermal load. The predictive models are artificial neural networks exposed to five optimizer algorithms, namely Archimedes optimization algorithm (AOA), Beluga whale optimization (BWO), forensic-based investigation (FBI), snake optimizer (SO), and transient search algorithm (TSO), for attaining optimal trainings. These five integrations aim at predicting the annual thermal energy demand. The accuracy of the models is broadly assessed using mean absolute percentage error (MAPE), root mean square error (RMSE), and coefficient of determination (R2) indicators and a ranking system is accordingly developed. As the MAPE and R2 reported, all obtained relative errors were below 5% and correlations were above 92% which confirm the general acceptability of the results and all used models. While the models exhibited different performances in training and testing stages, referring to the overall results, the BWO emerged as the most accurate algorithm, followed by the AOA and SO simultaneously in the second position, the FBI as the third, and TSO as the fourth accurate model. Mean absolute error (MAPE) and Considering the wide variety of artificial intelligence techniques that are used nowadays, the findings of this research may shed light on the selection of proper techniques for reliable energy performance analysis in complex buildings.


Background
Today's modern world has been benefitted from many advances aiming at providing convenient solutions to complicated problems [1][2][3].These solutions can be obtained from various approaches such as laboratory test and software-based simulations [4][5][6].In the field of energy, experts have used recent advances in order to better deal with energy-related simulations in different stages including generation, transformation, consumption of power [7][8][9].As is broadly known, analyzing the energy performance of buildings is of utmost importance towards reducing energy consumption in the building sector.For this purpose, many experts have suggested using artificial intelligence techniques for predicting the required energy [10,11].In this process, the characteristics of the building (e.g., geometry) are analyzed to establish a dependency between these characteristics and the energy parameter [12].

Literature review
Random forest, adaptive neuro-fuzzy inference system (ANFIS), and support vector regression (SVR) are among popular machine learning models that have been used for energy prediction in various buildings [13][14][15].Artificial neural networks (ANNs) [16] are another powerful type of machine learning tools that have widely served for energy-related analysis in buildings [17].Many experts have applied different ANNs to predicting heating and cooling loads in various buildings [11,18].By providing a flexible non-linear space, ANNs can map the relationship between the building properties and required thermal loads.Some examples of other fields in which machine learning models have promisingly served can be predicting engineers parameters such as streamflow [19], material strength [20], groundwater potential [21], and pan evaporation [22].
Optimization-oriented problems have always been challenging for experts in many domains [23].Recently, metaheuristic algorithms have greatly assisted scientists for optimization.The main use of these techniques is optimizing a given problem by minimizing or maximizing an objective function [24][25][26].Most metaheuristic strategies are inspired by natural behaviors such as herding behaviors and colony formation of animals, and natural phenomena such as water cycle, etc. [27][28][29].Energy optimization in buildings is one of the subjects that has gained potential use of these algorithms [30,31].They are able to enhance the performance of various components of an energy systems such as heating, ventilating, and air conditioning (HVAC) tools [32].For instance, Wang, Chen [33] used several metaheuristic optimizers (e.g., moth flame optimization (MFO) and shuffled frog leaping algorithm (SFLA)) for tunning IoTbased green building energy system.As another example, Dongare, Kharde [16] employed genetic algorithm (GA) for developing control strategies in air conditioning systems.
Metaheuristic algorithms play a significant complementary role when they are coupled with machine learning tools [34,35].Guo, Moayedi [36] suggested optimal modifications for the HVAC systems of residential buildings using ANN and salp swarm algorithm (SSA).These algorithm can replace the training strategy of the ANN for saving it from detrimental computational traps.In literature, there are many works that have recommended incorporating metaheuristic techniques into conventional predictive techniques.Kardani, Bardhan [37], for instance, used a combination of ANFIS with biogeography-based optimization (BBO) and improved particle swarm optimization (IPSO) for predicting heating and cooling load.Likewise, Alkhazaleh, Nahi [38] professed the great ability of ANFIS optimized with Harris hawks optimization (HHO) and equilibrium optimization (EO) for analyzing the thermal energy demand of residential buildings.
As far as the ANNs are concerned, they have shown high integration competency to be trained via metaheuristic techniques.Nejati, Zoy [39] introduced a hybrid of ANN with symbiotic organism search (SOS) for energy performance assessment, and compared the suggested model with four benchmark metaheuristic strategies, namely Henry gas solubility optimization (HGSO), political optimizer (PO), heap-based optimizer (HBO), atom search optimization (ASO), cuttlefish optimization algorithm (CFOA), and stochastic fractal search (SFS).After careful assessment of accuracy, they concluded the superiority of the SOS-ANN method for the mentioned objective.However, there were potential results for the SFS, too.In a similar research and for the same objective, Jahanafroozi, Shokrpour [40] combined an ANN with electrostatic discharge algorithm (ESDA) and declared its higher capability in comparison with satin bowerbird optimization (SBO), chimp optimization algorithm (ChOA), future search algorithm (FSA), seeker optimization algorithm (SOA), and SOS.In literature, different comparative studies can also be found that have conducted accuracy-based and time-based comparisons among a large number of metaheuristic techniques.For instance, Lin and Wang [41] used slime mould algorithm (SMA), equilibrium optimizer (EO), electromagnetic field optimization (EFO), multi-tracker optimization algorithm (MTOA), and multi-verse optimizer (MVO) for optimizing the ANN subjected to the prediction of building thermal loads.From accuracy assessment, it was shown that the WCA provides the most reliable solution, while from the time assessment, it was revealed that the EFO, despite a considerably higher number of iterations, finds the optimal solution faster.

Problem statement and objective
Whereas many similar efforts can be addressed that have used well-known techniques for analyzing the buildings' energy pattern, a notable gap of knowledge may emerge as most studies are limited to old algorithms such as GA and PSO [42,43].On the other hand, several recent studies have demonstrated the great potential of newer metaheuristic algorithms.Some examples can be found in the following studies: electrostatic discharge algorithm (ESDA) by Jahanafroozi, Shokrpour [40], vortex search algorithms (VSA) by Wu, Foong [44], teaching-learning based optimization (TLBO) by Almutairi, Algarni [45], water cycle algorithm (WCA) by Lin and Lin [46], etc.Therefore, to keep the solutions of energy analysis updated, it is essential to employ and evaluate newest members of metaheuristic family.To achieve this, this study is conducted to introduce and compare five novel solutions for the problem of energy performance analysis in residential buildings.The proposed techniques include Archimedes optimization algorithm (AOA), Beluga whale optimization (BWO), Forensic-based investigation (FBI), snake optimizer (SO), and transient search algorithm (TSO) which are among the newest and most sophisticated metaheuristic techniques.In order to enable the algorithms to comply with the prediction task, they are computationally hybridized with an ANN.The requested parameter is the annual thermal energy demand (TED A ) that is considered as a function of several building characteristics.Hence, the algorithms establish a set of non-linear equations within the ANN bed to create the optimized TED A contribution from the influential parameters.The capacity of the models are then compared to point out the most promising method.At the end, the outstanding models are compared to some compatible approaches suggested in the previous literature.By doing this, it is believed that this study sheds new lights on energy performance analysis which is a complicated issue in the human modern lifestyle.

Data and analysis
Each machine learning dataset must consist of two major categories, namely inputs and outputs.Conceptually speaking, the output is the dependent parameter that is usually the target of prediction, while inputs are a set of independent parameters that the output depends on them in real-world.The dataset of this study [30] is made of one output which is TED A , along with several inputs which are (1) TC EW (transmission coefficient of the external walls), (2) TC R (transmission coefficient of the roof), (3) TC F (transmission coefficient of the floor), (4) SRA-C EW (solar radiation absorption coefficient of the exterior walls), (5) SRAC R (solar radiation absorption coefficient of the roof), (6) LC TB (linear coefficient of thermal bridges), (7) R ACH (air change rate), (8) ShC N (shading coefficient of North-facing windows), ( 9) ShC S (shading coefficient of South-facing windows), ( 10) ShC E (shading coefficient of East-facing windows), and ( 11) G (glazing).
Table 1 gives useful information about these parameters including the unit of measurement, in addition to the minimum, maximum, and mean values.
For a better visualization, Fig 1 depicts the scatterplots of data.In these charts, each input is depicted versus the TED A so that each point represents a sample whose coordinates are (TED A , corresponding input).In each chart, a linear equation expresses the established relationship, along with the coefficient of determination (R 2 ) which indicates the correlation between the TED A and the corresponding input.According to these values that are mostly larger than 80%, the TED A is highly proportional to all inputs.However, unlike other inputs, there is an adverse proportionality for the input G.
In each of the above charts, there are a total of 35 points.These samples are randomly split into two groups (i) training group with 28 samples (= 0.80 × 35) and (ii) testing group with 7 samples (= 0.20 × 35) [40,47].As their name connotes, these groups are used in the next sections for training and testing the models.

Accuracy evaluation techniques
Utilizing statistical accuracy criteria is the most common way for analyzing the goodness of machine learning performance.For the sake of reliability, this study hires three well-known formulations for this purpose: i. Mean absolute percentage error (MAPE) is an error index that reports the relative error in percentage, based on Eq 1.  (i) Root mean square error (RMSE) is another error index that based on Eq 2, measures the rooted average of the squared difference between the prediction and expectation.

RMSE ¼
ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi 1 S (ii) Coefficient of determination (R 2 ) tells us to what extend the prediction results are correlated with expectation, as Eq 3 expresses.
In the above formulations, TED Ai prediction and TED Ai expectation are representatives of real and predicted TED A , respectively, and S shows the number of pairs in calculation.

Employed algorithms
2.3.1 MLP neural network.Among various developed ANNs, the MLP is one of the most competent predictors that are known as universal approximators [48].Like many other intelligent methodologies, the MLPs are able to analyze and realize the non-linear pattern of a specific parameter.For this purpose, the model uses the larger portion of the data and then it can extrapolate the knowledge to the rest of data.The principal idea of learning in ANNs is the biological mechanism in the human neural system wherein a large number of neurons are totally connected to transmit and process information [49].
An MLP draws on a layered structure.Fig 2 shows the topology of the MLP network that is employed in this study.The used network has three layers (i) the first layer receives the inputs of the system which are TC EW , TC R , TC F , SRAC EW , SRAC R , LC TB , R ACH , ShC N , ShC S , ShC E , and G through eleven neurons, (ii) six neurons perform the calculations in the middle layer, and (iii) the single neuron in the output layer releases the predicted TED A [50].
Along with the weights (i.e., connection between the neurons) some bias terms are also used in the hidden and output layers.Based on Eq 4, these biases help adjusting the calculations.
where g() and f() stand for the activation functions of the output and hidden layers, respectively [51].

Metaheuristic algorithms.
This work applies several members of the metaheuristic family to a critical problem of the energy in buildings.As explained supra, the pivotal idea for using metaheuristic techniques along with artificial intelligence techniques is improving the solutions in an optimum way which preserve it from computational drawbacks [52].In general, these techniques are known as population-based, which means a number of agents search for the optimal solution in the defined problem space.Also, another important characteristics of these algorithms is being iterative.In other words, the agents aim at discovering a more promising solution throughout the implementation [24,27].In the following, a more specific description of the used techniques is provided.
The developers of the AOA are Hashim, Hussain [53] with reference to a well-known physics law, namely Archimedes' Principle.This algorithm, therefore, imitates the behavior of buoyant force that are applied upward to a given object that is immersed in fluid.The force is proportional to the weight of the affected (i.e., displaced) fluid.The AOA has been a nice optimizer for the ANN is recent studies [54].The second algorithm is BWO that was devised by Zhong, Li [55].This technique, as implied by the name, is inspired by the behaviors of beluga whales and includes three major stages, namely exploration, exploitation and whale fall which respectively attributes to the behavior of pair swim, prey, and whale fall.In the BWO, two ideas are introduce to enhance the algorithm (i) considering self-adaptive balance factor and probability of whale fall and (ii) introducing Levy flight for improving the global convergence.The FBI algorithm, introduced by Chou and Nguyen [56], is designed based on the strategies of investigators and police including investigation-location-pursuit processes.Easiness of use and being user-friendly are mentioned as the advantages of this technique.Each optimization process using FBI comprises five major steps (i) opening the case, (ii) collecting evidence, (iii) issuing instructions for inquiries, (iv) Pursuing a suspect, and (v) arresting him/her.This algorithm was coupled with ANN and showed promise in a study by Sayed, Rezk [57].Hashim and Hussien [58] proposed the SO algorithm with inspiration from the snakes' foraging and reproduction behavior.The mating of snake takes place when in low temperature and the food is enough.Hence, two parameters temperature and food quantity are considered for guiding the population within the exploration and exploitation phases.Proposed by Qais, Hasanien [59], the TSO is designed based on the transient behavior of switched electrical circuits.The considered system consists of storage elements (such as inductors and capacitors) along with resistors.The exploitation and exploration processes of the TSO algorithm imitate the exponential decay of the transient response of RC circuits and the underdamped transient response of RLC circuits, respectively.

Results and discussion
In this work, five new methodologies are proposed for constructing reliable TED A predictors.After data processing and constructing the models, the results are presented and elaborated in this part of the research.
The results of the model development and training are shown in Section 3.1, followed by accuracy assessment in Section 3.2, and eventually, proper discussion of the findings in Section 3.3.within the ANN network (by one of the mentioned algorithms).Considering the sensitivity of the metaheuristic algorithms to the size of population, each hybrid model is implemented with different population sizes to determine the most promising response.Fig 4 shows the results of this effort.Two columns depict the levels of training and testing objective functions (here RMSE) that are obtained for each population size.A line also reports the corresponding time of optimization.

Constructing five neuro-metaheuristic algorithms and sensitivity analysis
Based on Fig 4, the best population size for the AOA, BWO, FBI, SO, and TSO is 300, 500, 100, 100, and 400, respectively.Optimization of ANN using these algorithms took around 2065, 4655, 2162, 745, and 3316 seconds, respectively.Note that all models are executed for 1000 iterations (see Fig 3), as it is a well-accepted number of iterations for most metaheuristic algorithms [70].The results of these networks are extracted for accuracy assessment in the following sections.

Accuracy evaluation
Taking a look at the obtained accuracy criteria reveals a promising optimization competency for all used techniques.For instance, the MAPE indicates 4.03%, 2.57%, 2.72%, 2.61%, and 4.69% relative error for the AOA, BWO, FBI, SO, and TSO, respectively (the same order applies hereafter).These values are associated with the RMSEs of 4.42, 3.38, 3.07, 3.19, and 6.91 kWh.m -2 .year - .Referring to Table 1 and Fig  Going into the testing phase, the error indicators show even less errors relative to the training phase.In terms of MAPE, the errors are 1.94%, 1.99%, 2.74%, 2.72%, and 4.26%, while the RMSEs are1.78,1.94, 3.21, 2.57, and 4.75 kWh.m -2 .year - .A significant deduction from these values is that all five models have presented an accurate estimation of the TED A .
In order to better elaborate on the results, Fig 5 compares the estimated and expected TED A values in the form of regression charts.Based on the size of the considered datasets, there are a total of 28 training points and 7 testing points in each chart.
In a general point of view, Fig 5 demonstrates a very good compatibility between the expected and predicted TED A values.The reason for this claim is that all points are well positioned around the black line which is the hypothetical line of an ideal prediction.Quantitatively speaking, R 2 values of 0.971, 0.982, 0.985, 0.984, and 0.929 for the training data, as well as 0.997, 0.996, 0.990, 0.993, and 0.979 for the testing data, indicate above 92% accuracy in the training phase and above 97% accuracy in the testing phase.

Discussion
All results in the previous section profess an acceptable performance for the AOA, BWO, FBI, SO, and TSO algorithms.However, the goodness of training and testing results infer different points.When the training process is successful, it means that the models have nicely learnt the relationship between the TED A and building parameters.This is while suitable testing accuracy means that the trained models are capable of accurately predicting the TED A by receiving new building situations.
In the models developed in this study, the ANN possessed a total of 79 variables to be optimized by each metaheuristic algorithm (see Fig 2).These algorithms used 28 training data to adjust these 79 variables, and next, tested their efficiency using 7 testing data.It can be said, therefore, that this study introduced five novel methodologies that can be used for practical estimation of thermal energy demand by knowing the building characteristics.Since the results professed a reliable prediction by all employed models, addressing uncertainties would add to their reliability.Famously, there are two types of uncertainty in machine learning modeling, namely epistemic and aleatoric which respectively exist due to the lack of training data and inherent stochasticity of the observations [71].The dataset that was used in this work is a validated and popular collection of energy-related parameters in building.Referring to Fig 1 and related analysis in Section 2.1, it can be seen that the input factors have a reasonable consistency.However, the small number of training and testing instances could be a source of uncertainty in the prediction task.This issue can be a favorable subject of future works in order to examine if the training and testing quality increases with the increase of dataset size.It is worth mentioning that, unlike the dataset, the repeatability of the algorithms in this work was examined and confirmed by multiple runs for each configuration.
For explaining the contribution of this study in a clearer way, Fig 6 is created.This figure compares the real and predicted trends of the TED A versus two inputs, namely R ACH and ShC E .According to these illustrations, it is seen that all five algorithms have followed the TED A behavior with high sensitivity, especially in cut-off points.Hence, applying these models enables experts to capture an early estimation of the required thermal load for each building.However, considering the accuracy of prediction, the models have performed differently.These distinctions are discussed in the following paragraphs.
As far as machine learning applications are concerned, comparing the accuracy of models is of great importance for selecting the most promising models.For the models used in this work, there are different rankings with respect to the considered accuracy indicators.For this reason, a ranking system is used in which a score in [1,5] is specified to each mode based on each accuracy indicator.In this sense, the higher the accuracy, the bigger the score.The final score of each model is calculated as the sum of three scores obtained for the MAPE, RMSE, and R 2 .Table 2 gives the results of this process.
According to this table, in the training phase, the FBI algorithm with SS = 13 stands in the first position, followed by the SO, BWO, AOA, and TSO.As for the testing phase, the AOA gains the most accurate position with SS = 15, followed by the BWO, SO, FBI, and TSO.Having an overall assessment by considering both phases cumulatively, the BWO with overall SS = 23 can be introduced as the most accurate algorithm.After that, both AOA and SO stand

Conclusions
Five sophisticated integrative models were proposed and verified for accurate quantitative analysis of the required thermal energy in residential buildings.In so doing, Archimedes optimization algorithm (AOA), Beluga whale optimization (BWO), Forensic-based investigation (FBI), snake optimizer (SO), and transient search algorithm (TSO) were hybridized with an ANN to predict the TED A after exploring the characteristics of the intended building.Extensive accuracy evaluation was carried out to compare the performance of the models, according to which, it was found that there are discrepancies in the training and testing performance of all models.The FBI and SO attained the best training quality, while the most accurate prediction was achieved by AOA and BWO.Altogether, while all models attained less than 5% relative errors and above 92% correlation, the BWO with MAPE = 1.99% and R 2 = 0.996 was introduced as the most powerful optimizer used in this study.Hereupon, its combination with ANN may provide reliable solutions to practical problems of predicting thermal energy building.This study also encountered some limitations regarding the methodology and used dataset.For instance, the authors believe that this work can be pursued further by applying new generation of metaheuristic algorithms and verifying the proposed models with more comprehensive and real-world datasets.

Fig 3 .
Fig 3. Schematic view of the hybrid models.https://doi.org/10.1371/journal.pone.0290719.g003 1, these errors are in a tolerable range.Both MAPE and RMSE values show that the five used algorithms could fulfill the training task of the ANN for good.